
import os

# SECRET_KEY = os.urandom(24)
SECRET_KEY = 'asdasdasfas'

DEBUG = False

HOSTNAME = '127.0.0.1'
PORT = '3306'
DATABASE = 'jfbbs'
USERNAME = 'root'
PASSWORD = '123'


DB_URI = 'mysql+pymysql://{username}:{password}@{host}:{port}/{db}?charset=utf8'.format(username=USERNAME, password=PASSWORD, host=HOSTNAME, port=PORT, db=DATABASE)


SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = False


CMS_USER_ID = 'asd'
FRONT_USER_ID = 'ADSASDADASDASDA'

# MAIL_USE_TLS : 端口号:587
# MAIL_USE_SSL : 端口号:465
# QQ邮箱不支持非加密方式的发送邮件
# 发送者邮箱的服务器地址
MAIL_SERVER = "smtp.qq.com"
MAIL_PORT = '587'
MAIL_USE_TLS = True
MAIL_USERNAME = '1290298745@qq.com'
MAIL_PASSWORD = 'icmhihhnvbrjfehc'
MAIL_DEFAULT_SENDER = '1290298745@qq.com'



# UEditor的相关配置
UEDITOR_UPLOAD_TO_QINIU = True
UEDITOR_QINIU_ACCESS_KEY = "Stg_FuhoTzZ7wPNmbagdd2bBJyxE95-U_Lb8XY3L"
UEDITOR_QINIU_SECRET_KEY = "jWnJne9qGvPkm6PsIe08YTfvy-s9qdTzKmrbBl25"
UEDITOR_QINIU_BUCKET_NAME = "jifengbbs"
UEDITOR_QINIU_DOMAIN = "http://pi6crecxg.bkt.clouddn.com/"



# flask-paginate的相关配置
PER_PAGE = 10


# celery 相关配置 注意如果要是有密码,要先写密码格式: redis:// :密码@ip地址:端口号/0
# 查看redis密码: 在redis.conf文件(文件路径在 /usr/local/etc/redis.conf)
CELERY_RESULT_BACKEND = "redis://:jifeng@127.0.0.1:6379/0"
CELERY_BROKER_URL = "redis://:jifeng@127.0.0.1:6379/0"


# 在终端执行 celery -A tasks.celery worker --pool=solo --loglevel=info开启celery服务器
